package hgx.spring.cloud.lession.demo.c;/**
 * Created by liujun on 2018/4/20.
 */


import java.lang.reflect.Proxy;

/**
 * @author Administrator
 * @create 2018-04-20 9:59
 */
public class Invoker {
    public Object getInstance(Class<?> cls){
        MethodProxy invocationHandler = new MethodProxy();
        Object newProxyInstance = Proxy.newProxyInstance(
                cls.getClassLoader(),
                new Class[] { cls },
                invocationHandler);
        return (Object)newProxyInstance;
    }
}
